@ConnectorHeight: 44px;

[react-component='Home'] {
  position: relative;
  height: 100vh;
  .tabContainer {
    padding: 8px 8px 0 8px;
    height: calc(100% - @ConnectorHeight);
  }

  .search {
    padding: 8px 2px 0px;
    .ant-input {
      font-size: 16px;
      &::-webkit-input-placeholder {
        color: #777777;
      }
    }
  }

  .emptyJobs {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

[react-component='JobBlock'] {
  @margin: 10px;
  border: 2px solid #333333;
  border-radius: 6px;
  margin-top: @margin;
  &:last-child {
    margin-bottom: @margin;
  }
  .header {
    position: relative;
    padding: 6px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    .title {
      font-size: 14px;
      user-select: none;
      word-break: break-all;
      flex: 1;
      > span {
        display: block;
        padding: 0 4px;
      }
    }
    .icon {
      width: 40px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      .anticon {
        font-size: 14px;
        transition: all 0.3s;
        font-weight: 600;
      }
      @keyframes shake_thunder {
        @strength: 2px;
        0%,
        6%,
        12%,
        18%,
        24%,
        30%,
        36%,
        42%,
        48% {
          top: -@strength;
        }
        3%,
        9%,
        15%,
        21%,
        27%,
        33%,
        39%,
        45%,
        51% {
          top: @strength;
        }
        52% {
          top: 0;
        }
        100% {
          top: 0;
        }
      }
      .loadingThunder {
        color: #ffc53d;
        font-size: 20px;
        position: relative;
        animation: 1.4s linear 0.5s infinite shake_thunder;
      }
    }
  }

  .collapseSection {
    position: relative;
    overflow: hidden;
    transition: height 0.2s;
    .property {
      height: 64px;
      .name {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 13px;
        user-select: none;
        .hideBtn {
          color: #1890ff;
          cursor: pointer;
          transition: color 0.3s;
          font-size: 12px;
          user-select: none;
          &:hover {
            color: #40a9ff;
          }
          &:active {
            color: #69c0ff;
          }
        }
      }
      .desc {
        user-select: none;
        color: #888888;
        font-size: 10px;
      }
    }
  }

  .operation {
    position: relative;
    height: 36px;
    .lastBuild {
      margin-left: 4px;
      height: 100%;
      display: flex;
      align-items: center;
      .tag {
        background-color: #096dd9;
        border-radius: 4px;
        font-size: 10px;
        padding: 1px 5px;
        margin-left: 6px;
        color: #ffffff;
        cursor: pointer;
        user-select: none;
      }
    }
    .favor {
      position: absolute;
      top: 0;
      bottom: 0;
      right: 70px;
      margin: auto;
      display: flex;
      align-items: center;
      height: 100%;
      padding-top: 4px;
    }
    .buildBar {
      position: absolute;
      width: 64px;
      height: 24px;
      top: 0;
      bottom: 0;
      right: 6px;
      margin: auto;
      background-color: #096dd9;
      color: #ffffff;
      border-radius: 4px;
      cursor: pointer;
      user-select: none;
      overflow: hidden;
      transition: all 0.5s;
      z-index: 1;
      .buildBtn {
        line-height: 24px;
        height: 100%;
        width: 100%;
        text-align: center;
        font-size: 11px;
      }
      &.build {
        width: 100%;
        height: 100%;
        border-radius: 2px;
        background-color: #bae7ff;
        right: 0;

        .stageBar {
          @margin: 6px;
          position: absolute;
          top: 0;
          bottom: 0;
          left: @margin;
          height: calc(100% - @margin * 2);
          margin: auto;
          display: flex;
          align-items: center;
          justify-content: space-between;
          border-radius: 3px;
          font-size: 12px;
          color: #ffffff;
          overflow: hidden;
          transition: all 0.5s;
          padding: 0 6px;
          .name {
            width: 70%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
      }
    }
  }
}

[react-component='Connector'] {
  .blank {
    height: @ConnectorHeight;
    width: 100%;
    background-color: aqua;
  }

  .connectBar {
    position: fixed;
    height: @ConnectorHeight;
    width: 100%;
    border-top: 1px solid #333333;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 999;
    background-color: var(--vscode-editor-background);
    .info {
      display: flex;
      align-items: center;
    }
    .success {
      color: #7cb305;
      margin-right: 12px;
      display: flex;
      align-items: center;
    }
    .failed {
      color: #cf1322;
      margin-right: 10px;
    }
    .icon {
      cursor: pointer;
    }
  }
  .settingModal {
    @modalHeight: 200px;
    @radius: 10px;
    z-index: 998;
    height: @modalHeight;
    width: 100%;
    background-color: var(--vscode-editor-background);
    bottom: -@modalHeight;
    position: fixed;
    border-top-left-radius: @radius;
    border-top-right-radius: @radius;
    box-shadow: 0 -2px 1px #555555;
    transition: bottom 0.3s;
    padding: 16px 0;
    &.show {
      bottom: @ConnectorHeight;
    }
    .setItem {
      margin: 8px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  }
  .mask {
    z-index: 997;
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: visibility 0.6s, opacity 0.6s;
    visibility: hidden;
    opacity: 0;
    &.show {
      visibility: visible;
      opacity: 1;
    }
  }
}
